﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:local="clr-namespace:Faust.Andrew.MTG" xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" x:Name="window" x:Class="Faust.Andrew.MTG.MainWindow"
    Title="MTG Manager" Background="{DynamicResource DefaultWindowBackground}" MinWidth="600" MinHeight="600" d:DesignWidth="972" Closing="Window_Closing" Loaded="Window_Loaded" Icon="/MTGManager;component/MTGManagerIcon.ico" d:DesignHeight="1038">
	<Window.Resources>
		<DataTemplate x:Key="CardTemplate">
		<StackPanel x:Name="LayoutRoot" ToolTip="{Binding CardText, Mode=OneWay}" PreviewMouseLeftButtonDown="Card_PreviewMouseLeftButtonDown" PreviewMouseMove="Card_PreviewMouseMove">
			<StackPanel.LayoutTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</StackPanel.LayoutTransform>
			<Border x:Name="border" BorderThickness="10" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="10" CornerRadius="5" Background="{Binding Color, Converter={StaticResource ManaColorToBrushVertical}, Mode=OneWay}" BorderBrush="{Binding Rarity, Converter={StaticResource RarityToBrush}, Mode=OneWay}">
				<StackPanel Margin="0">
					<Image Height="310" Width="223" Source="{Binding ImageSource, Mode=OneWay}"/>
					<Grid Margin="0,5,0,0" Background="#FF6E6E6E">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition Width="0.5*"/>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition Width="0.5*"/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>					
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>
						<Label x:Name="OwnedLabel" Margin="0" Content="Owned:" Foreground="White"/>
						<Label x:Name="InUseLabel" Margin="0" VerticalAlignment="Top" Grid.Column="2" Content="In Use:" Foreground="White"/>
						<Label x:Name="InUseCount" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Bottom" Grid.Column="3" Foreground="White" Content="{Binding InUse}"/>
						<TextBox x:Name="txtOwned" Margin="0,2" Text="{Binding Quantity, Converter={StaticResource IntToStringConverter}, Mode=TwoWay}" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" Grid.Column="1" Background="DarkGray" VerticalAlignment="Center"/>
						<ToggleButton x:Name="toggleButton" Margin="0" Style="{DynamicResource BiggifyButtonTemplate}" ContentTemplate="{DynamicResource BiggifyButtonContentTemplate}" Grid.Column="4"/>
					</Grid>
				</StackPanel>
			</Border>
		</StackPanel>
		<DataTemplate.Triggers>
			<Trigger Property="IsChecked" Value="True" SourceName="toggleButton">
				<Setter Property="LayoutTransform" TargetName="LayoutRoot">
					<Setter.Value>
						<TransformGroup>
							<ScaleTransform ScaleX="1.0" ScaleY="1.0"/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform/>
						</TransformGroup>
					</Setter.Value>
				</Setter>
			</Trigger>
			<Trigger Property="IsChecked" SourceName="toggleButton" Value="True">
				<Setter Property="LayoutTransform" TargetName="LayoutRoot">
					<Setter.Value>
						<TransformGroup>
							<ScaleTransform ScaleX="1.5" ScaleY="1.5"/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform/>
						</TransformGroup>
					</Setter.Value>
				</Setter>
			</Trigger>
		</DataTemplate.Triggers>
	</DataTemplate>
	</Window.Resources>
	<Grid x:Name="GridMainWindow">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>
		<Menu Margin="0" VerticalAlignment="Top">
			<MenuItem Header="_File">
				<MenuItem x:Name="mnuImportCards" Header="_Import Cards" Click="mnuImportCards_Click"/>
				<MenuItem x:Name="mnuBackup" Header="_Backup Database" Click="mnuBackup_Click"/>
				<Separator/>
				<MenuItem x:Name="mnuExportDeck" Header="_Export Deck" Click="mnuExportDeck_Click"/>
				<MenuItem x:Name="mnuPrintDeckChecklist" Header="_Print Deck Checklist" Click="mnuPrintDeckChecklist_Click"/>
				<Separator/>
				<MenuItem x:Name="mnuExit" Header="E_xit" Click="mnuExit_Click"/>
			</MenuItem>
			<MenuItem Header="_Help">
				<MenuItem x:Name="mnuAbout" Header="_About"/>
			</MenuItem>
			<MenuItem Header="Help">
				<MenuItem Header="_Report Issue / Send Feedback" Click="ReportIssue_Click"/>
			</MenuItem>
		</Menu>
		<Grid x:Name="GridContentArea" Margin="0" Grid.Row="1">
			<Grid.RowDefinitions>
				<RowDefinition Height="*" />			
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="*"/>				
			</Grid.ColumnDefinitions>
			<Grid x:Name="GridCardSpace" Margin="0,5,5,5" Grid.Column="1">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<Grid x:Name="GridNav" Margin="0,0,0,2" Background="{DynamicResource ControlBoxBrush}">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="0.5*"/>
						<ColumnDefinition Width="0.5*"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<StackPanel x:Name="countPanel" Margin="5,0,0,0" Orientation="Horizontal">
						<Label Content="Count:" Margin="0,0,5,0" VerticalAlignment="Center"/>
						<Label x:Name="lblCount" VerticalAlignment="Center" Content="0"/>
					</StackPanel>
					<ComboBox x:Name="cmbSortBy" VerticalAlignment="Center" MinWidth="100" Margin="0" IsReadOnly="True" VerticalContentAlignment="Center" HorizontalAlignment="Center" Grid.Column="1" SelectionChanged="cmbSortBy_SelectionChanged" Visibility="Collapsed">
						<ListBoxItem Content="Name"/>
						<ListBoxItem Content="Rarity"/>
						<ListBoxItem Content="Color"/>
						<ListBoxItem Content="Type"/>
						<ListBoxItem Content="Converted Mana Cost"/>
						<ListBoxItem Content="Owned"/>
					</ComboBox>
					<StackPanel x:Name="pagingPanel" HorizontalAlignment="Right" Margin="0,5,5,5" Orientation="Horizontal" Grid.Column="2">
						<local:PagingControl x:Name="pageControl" PageChangedEvent="pageControl_PageChangedEvent"/>
					</StackPanel>
				</Grid>
				<ListBox x:Name="lbCards" Background="{x:Null}" ItemTemplate="{DynamicResource CardTemplate}" ItemsPanel="{DynamicResource CardLayoutTemplate}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{DynamicResource CardItemContainerTemplate}" BorderBrush="{x:Null}" Margin="0" Grid.Row="1" >
					<ListBox.ContextMenu>
						<ContextMenu>
							<MenuItem x:Name="mnuSaveCard" Header="_Save" Click="mnuSaveCard_Click"/>
						</ContextMenu>
					</ListBox.ContextMenu>
				</ListBox>
				<Expander x:Name="ExpanderDeck" Margin="0" Header="Deck" Grid.Row="2" Background="{DynamicResource ControlBoxBrush}" Visibility="Collapsed">
					<TabControl Background="{x:Null}">
						<TabItem Header="Deck Cards" Margin="0">
							<Grid x:Name="GridDeck" MinHeight="250" Margin="0">
								<ListBox x:Name="lbDeck" Background="{x:Null}" BorderBrush="#FF433D3D" ScrollViewer.HorizontalScrollBarVisibility="Auto" ItemTemplate="{DynamicResource DeckCardListBoxItem}" ItemsPanel="{DynamicResource CardLayoutTemplate}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ItemContainerStyle="{DynamicResource DeckCardItemLayoutTemplate}" ItemsSource="{Binding Mode=OneWay}" />
							</Grid>
						</TabItem>
						<TabItem Header="Description">
							<Grid Margin="0" VerticalAlignment="Center" Height="230.9">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="*"/>
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="*"/>
								</Grid.RowDefinitions>
								<Label x:Name="lblDeckName" Margin="0" Content="Name:" d:LayoutOverrides="Width, Height"/>
								<TextBox x:Name="txtDeckName" Margin="0" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" Grid.Column="1" Text="{Binding Name, Mode=TwoWay}"/>
								<Label x:Name="lblDeckDescription" Margin="0" Content="Description:" d:LayoutOverrides="Width, Height" Grid.Row="1" Grid.ColumnSpan="2"/>
								<TextBox x:Name="txtDeckDescription" Margin="0" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" Grid.Row="2" Grid.ColumnSpan="2" AcceptsTab="True" AcceptsReturn="True" Text="{Binding Description, Mode=TwoWay}"/>
							</Grid>
						</TabItem>
					</TabControl>
				</Expander>
			</Grid>
			<Grid x:Name="GridControlBox" Margin="5" MaxWidth="250" MinWidth="130">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<Grid x:Name="GridSearchBox" Margin="0" Background="#FFCDCDCD">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="*"/>
					</Grid.ColumnDefinitions>
					<Grid.RowDefinitions>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="*"/>
					</Grid.RowDefinitions>
					<Label Margin="5,5,5,0" Content="Name:" Padding="0"/>
					<Label Margin="5,5,5,0" Content="Rarity:" Grid.Row="2" Padding="0"/>
					<Label Margin="5,5,5,0" Content="Color:" Grid.Row="3" Padding="0"/>
					<Label Margin="5,5,5,0" Content="Type:" Grid.Row="4" Padding="0"/>
					<Label Margin="5,5,5,0" Content="Sub Type:" Grid.Row="5" Padding="0"/>
					<Label Margin="5,5,5,0" Content="Text:" Grid.Row="6" Padding="0"/>
					<Label Margin="5,5,5,0" Content="Expansion:" Grid.Row="7" Padding="0"/>
					<CheckBox x:Name="chkOwned" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Center" Content="Owned" Grid.Row="9" Padding="0" IsChecked="True" TabIndex="8"/>
					<CheckBox x:Name="chkOnline" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Center" Content="Search Gatherer" Grid.Row="10" Padding="0" IsChecked="True" TabIndex="9"/>
					<Expander Grid.ColumnSpan="2" Grid.Row="11" VerticalAlignment="Center" MinWidth="100" TabIndex="0" Header="Custom Where Clause" Margin="5,5,5,0" ToolTip="The custom where clause will allow you to specify your own where clause to use. It can only be used to search the local repository. This feature is mainly for developers who are familiar with the MTG Manager database structure.">
						<TextBox x:Name="txtWhereClause" TextWrapping="Wrap" MinWidth="100" TabIndex="0" AcceptsTab="True" AcceptsReturn="True"/>
					</Expander>
					<Button x:Name="btnSearch" Margin="0,5" Content="Search" Grid.Row="12" VerticalAlignment="Top" HorizontalAlignment="Center" Grid.ColumnSpan="2" Click="btnSearch_Click" Padding="5,1" TabIndex="10" />
					<TextBox x:Name="txtName" Margin="-0.001,5,4.999,0" Grid.Column="1" TextWrapping="Wrap" VerticalAlignment="Center" MinWidth="100" TabIndex="0"/>
					<TextBox x:Name="txtCardText" Margin="0,5,5,0" Grid.Column="1" Grid.Row="6" TextWrapping="Wrap" VerticalAlignment="Center" TabIndex="5"/>					
					<ComboBox x:Name="cmbExpansion" Margin="0,5,5,0" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" IsEditable="True" IsTabStop="True" TabIndex="6">
						<ListBoxItem Content="Alara Reborn" />
						<ListBoxItem Content="Alliances" />
						<ListBoxItem Content="Antiquities" />
						<ListBoxItem Content="Apocalypse" />
						<ListBoxItem Content="Arabian Nights" />
						<ListBoxItem Content="Battle Royale Box Set" />
						<ListBoxItem Content="Beatdown Box Set" />
						<ListBoxItem Content="Betrayers of Kamigawa" />
						<ListBoxItem Content="Champions of Kamigawa" />
						<ListBoxItem Content="Chronicles" />
						<ListBoxItem Content="Classic Sixth Edition" />
						<ListBoxItem Content="Coldsnap" />
						<ListBoxItem Content="Conflux" />
						<ListBoxItem Content="Darksteel" />
						<ListBoxItem Content="Dissension" />
						<ListBoxItem Content="Duel Decks: Divine vs. Demonic" />
						<ListBoxItem Content="Duel Decks: Elves vs. Goblins" />
						<ListBoxItem Content="Duel Decks: Jace vs. Chandra" />
						<ListBoxItem Content="Eighth Edition" />
						<ListBoxItem Content="Eventide" />
						<ListBoxItem Content="Exodus" />
						<ListBoxItem Content="Fallen Empires" />
						<ListBoxItem Content="Fifth Dawn" />
						<ListBoxItem Content="Fifth Edition" />
						<ListBoxItem Content="Fourth Edition" />
						<ListBoxItem Content="From the Vault: Dragons" />
						<ListBoxItem Content="From the Vault: Exiled" />
						<ListBoxItem Content="Future Sight" />
						<ListBoxItem Content="Guildpact" />
						<ListBoxItem Content="Homelands" />
						<ListBoxItem Content="Ice Age" />
						<ListBoxItem Content="Invasion" />
						<ListBoxItem Content="Judgment" />
						<ListBoxItem Content="Legends" />
						<ListBoxItem Content="Legions" />
						<ListBoxItem Content="Limited Edition Alpha" />
						<ListBoxItem Content="Limited Edition Beta" />
						<ListBoxItem Content="Lorwyn" />
						<ListBoxItem Content="Magic 2010" />
						<ListBoxItem Content="Masters Edition" />
						<ListBoxItem Content="Masters Edition II" />
						<ListBoxItem Content="Masters Edition III" />
						<ListBoxItem Content="Mercadian Masques" />
						<ListBoxItem Content="Mirage" />
						<ListBoxItem Content="Mirrodin" />
						<ListBoxItem Content="Morningtide" />
						<ListBoxItem Content="Nemesis" />
						<ListBoxItem Content="Ninth Edition" />
						<ListBoxItem Content="Odyssey" />
						<ListBoxItem Content="Onslaught" />
						<ListBoxItem Content="Planar Chaos" />
						<ListBoxItem Content="Planechase" />
						<ListBoxItem Content="Planeshift" />
						<ListBoxItem Content="Portal" />
						<ListBoxItem Content="Portal Second Age" />
						<ListBoxItem Content="Portal Three Kingdoms" />
						<ListBoxItem Content="Promo set for Gatherer" />
						<ListBoxItem Content="Prophecy" />
						<ListBoxItem Content="Ravnica: City of Guilds" />
						<ListBoxItem Content="Revised Edition" />
						<ListBoxItem Content="Saviors of Kamigawa" />
						<ListBoxItem Content="Scourge" />
						<ListBoxItem Content="Seventh Edition" />
						<ListBoxItem Content="Shadowmoor" />
						<ListBoxItem Content="Shards of Alara" />
						<ListBoxItem Content="Starter 1999" />
						<ListBoxItem Content="Starter 2000" />
						<ListBoxItem Content="Stronghold" />
						<ListBoxItem Content="Tempest" />
						<ListBoxItem Content="Tenth Edition" />
						<ListBoxItem Content="The Dark" />
						<ListBoxItem Content="Time Spiral" />
						<ListBoxItem Content="Time Spiral Timeshifted" />
						<ListBoxItem Content="Torment" />
						<ListBoxItem Content="Unglued" />
						<ListBoxItem Content="Unhinged" />
						<ListBoxItem Content="Unlimited Edition" />
						<ListBoxItem Content="Urza's Destiny" />
						<ListBoxItem Content="Urza's Legacy" />
						<ListBoxItem Content="Urza's Saga" />
						<ListBoxItem Content="Visions" />
						<ListBoxItem Content="Weatherlight" />
						<ListBoxItem Content="Zendikar" />
					</ComboBox>
					<ComboBox x:Name="cmbRarity" Margin="0,5,5,0" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" IsEditable="True" IsTabStop="True" TabIndex="1">
						<ListBoxItem Content="Common"/>
						<ListBoxItem Content="Uncommon"/>
						<ListBoxItem Content="Rare"/>
						<ListBoxItem Content="Mythic Rare"/>
					</ComboBox>
					<ComboBox x:Name="cmbColor" Margin="0,5,5,0" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3" IsEditable="True" IsTabStop="True" TabIndex="2">
						<ComboBox.ItemBindingGroup>
							<BindingGroup/>
						</ComboBox.ItemBindingGroup>
						<ListBoxItem Content="Black" />
						<ListBoxItem Content="Red" />
						<ListBoxItem Content="Green" />
						<ListBoxItem Content="Blue" />
						<ListBoxItem Content="White"/>
						<ListBoxItem Content="Colorless" />
						<ListBoxItem Content="Multi"/>							
					</ComboBox>
					<ComboBox x:Name="cmbType" Margin="0,5,5,0" Grid.Column="1" Grid.Row="4" IsEditable="True" VerticalAlignment="Center" IsTabStop="True" TabIndex="3">
						<ListBoxItem Content="Creature"/>
						<ListBoxItem Content="Land"/>
						<ListBoxItem Content="Instant"/>
						<ListBoxItem Content="Sorcery"/>
						<ListBoxItem Content="Artifact"/>
						<ListBoxItem Content="Enchantment"/>
                        <ListBoxItem Content="Plane"/>
                        <ListBoxItem Content="Planeswalker"/>
                        <ListBoxItem Content="Legendary"/>
                        <ListBoxItem Content="Snow"/>
                        <ListBoxItem Content="Tribal"/>
                        <ListBoxItem Content="World"/>
					</ComboBox>
					<ComboBox x:Name="cmbSubtype" Margin="0,5,5,0" Grid.Row="5" VerticalAlignment="Center" Grid.Column="1" SelectedIndex="0" IsEditable="True" IsTabStop="True" TabIndex="4">
						<ListBoxItem Content="" />
						<ListBoxItem Content="Advisor" />
						<ListBoxItem Content="Ajani" />
						<ListBoxItem Content="Alara" />
						<ListBoxItem Content="Ally" />
						<ListBoxItem Content="Angel" />
						<ListBoxItem Content="Anteater" />
						<ListBoxItem Content="Antelope" />
						<ListBoxItem Content="Ape" />
						<ListBoxItem Content="Arcane" />
						<ListBoxItem Content="Archer" />
						<ListBoxItem Content="Archon" />
						<ListBoxItem Content="Arkhos" />
						<ListBoxItem Content="Artificer" />
						<ListBoxItem Content="Assassin" />
						<ListBoxItem Content="Assembly-Worker" />
						<ListBoxItem Content="Atog" />
						<ListBoxItem Content="Aura" />
						<ListBoxItem Content="Aurochs" />
						<ListBoxItem Content="Avatar" />
						<ListBoxItem Content="Badger" />
						<ListBoxItem Content="Barbarian" />
						<ListBoxItem Content="Basilisk" />
						<ListBoxItem Content="Bat" />
						<ListBoxItem Content="Bear" />
						<ListBoxItem Content="Beast" />
						<ListBoxItem Content="Beeble" />
						<ListBoxItem Content="Berserker" />
						<ListBoxItem Content="Bird" />
						<ListBoxItem Content="Boar" />
						<ListBoxItem Content="Bolas" />
						<ListBoxItem Content="Bolas's" />
						<ListBoxItem Content="Bringer" />
						<ListBoxItem Content="Brushwagg" />
						<ListBoxItem Content="Camel" />
						<ListBoxItem Content="Carrier" />
						<ListBoxItem Content="Cat" />
						<ListBoxItem Content="Centaur" />
						<ListBoxItem Content="Cephalid" />
						<ListBoxItem Content="Chandra" />
						<ListBoxItem Content="Chimera" />
						<ListBoxItem Content="Cleric" />
						<ListBoxItem Content="Cockatrice" />
						<ListBoxItem Content="Construct" />
						<ListBoxItem Content="Crab" />
						<ListBoxItem Content="Crocodile" />
						<ListBoxItem Content="Cyclops" />
						<ListBoxItem Content="Dauthi" />
						<ListBoxItem Content="Demon" />
						<ListBoxItem Content="Desert" />
						<ListBoxItem Content="Devil" />
						<ListBoxItem Content="Djinn" />
						<ListBoxItem Content="Dominaria" />
						<ListBoxItem Content="Dragon" />
						<ListBoxItem Content="Drake" />
						<ListBoxItem Content="Dreadnought" />
						<ListBoxItem Content="Drone" />
						<ListBoxItem Content="Druid" />
						<ListBoxItem Content="Dryad" />
						<ListBoxItem Content="Dwarf" />
						<ListBoxItem Content="Efreet" />
						<ListBoxItem Content="Egg" />
						<ListBoxItem Content="Elder" />
						<ListBoxItem Content="Elemental" />
						<ListBoxItem Content="Elephant" />
						<ListBoxItem Content="Elf" />
						<ListBoxItem Content="Elk" />
						<ListBoxItem Content="Elspeth" />
						<ListBoxItem Content="Equilor" />
						<ListBoxItem Content="Equipment" />
						<ListBoxItem Content="Eye" />
						<ListBoxItem Content="Faerie" />
						<ListBoxItem Content="Ferret" />
						<ListBoxItem Content="Fish" />
						<ListBoxItem Content="Flagbearer" />
						<ListBoxItem Content="Forest" />
						<ListBoxItem Content="Fortification" />
						<ListBoxItem Content="Fox" />
						<ListBoxItem Content="Frog" />
						<ListBoxItem Content="Fungus" />
						<ListBoxItem Content="Gargoyle" />
						<ListBoxItem Content="Garruk" />
						<ListBoxItem Content="Giant" />
						<ListBoxItem Content="Gnome" />
						<ListBoxItem Content="Goat" />
						<ListBoxItem Content="Goblin" />
						<ListBoxItem Content="Golem" />
						<ListBoxItem Content="Gorgon" />
						<ListBoxItem Content="Griffin" />
						<ListBoxItem Content="Hag" />
						<ListBoxItem Content="Harpy" />
						<ListBoxItem Content="Hellion" />
						<ListBoxItem Content="Hippo" />
						<ListBoxItem Content="Homarid" />
						<ListBoxItem Content="Homunculus" />
						<ListBoxItem Content="Horror" />
						<ListBoxItem Content="Horse" />
						<ListBoxItem Content="Hound" />
						<ListBoxItem Content="Human" />
						<ListBoxItem Content="Hydra" />
						<ListBoxItem Content="Hyena" />
						<ListBoxItem Content="Illusion" />
						<ListBoxItem Content="Imp" />
						<ListBoxItem Content="Incarnation" />
						<ListBoxItem Content="Insect" />
						<ListBoxItem Content="Iquatana" />
						<ListBoxItem Content="Ir" />
						<ListBoxItem Content="Island" />
						<ListBoxItem Content="Jace" />
						<ListBoxItem Content="Jellyfish" />
						<ListBoxItem Content="Juggernaut" />
						<ListBoxItem Content="Kaldheim" />
						<ListBoxItem Content="Kamigawa" />
						<ListBoxItem Content="Kavu" />
						<ListBoxItem Content="Kirin" />
						<ListBoxItem Content="Kithkin" />
						<ListBoxItem Content="Knight" />
						<ListBoxItem Content="Kobold" />
						<ListBoxItem Content="Kor" />
						<ListBoxItem Content="Kraken" />
						<ListBoxItem Content="Lair" />
						<ListBoxItem Content="Lammasu" />
						<ListBoxItem Content="Leech" />
						<ListBoxItem Content="Leviathan" />
						<ListBoxItem Content="Lhurgoyf" />
						<ListBoxItem Content="Licid" />
						<ListBoxItem Content="Liliana" />
						<ListBoxItem Content="Lizard" />
						<ListBoxItem Content="Locus" />
						<ListBoxItem Content="Lorwyn" />
						<ListBoxItem Content="Manticore" />
						<ListBoxItem Content="Masticore" />
						<ListBoxItem Content="Meditation" />
						<ListBoxItem Content="Mercadia" />
						<ListBoxItem Content="Mercenary" />
						<ListBoxItem Content="Merfolk" />
						<ListBoxItem Content="Metathran" />
						<ListBoxItem Content="Mine" />
						<ListBoxItem Content="Minion" />
						<ListBoxItem Content="Minotaur" />
						<ListBoxItem Content="Mirrodin" />
						<ListBoxItem Content="Moag" />
						<ListBoxItem Content="Monger" />
						<ListBoxItem Content="Mongoose" />
						<ListBoxItem Content="Monk" />
						<ListBoxItem Content="Moonfolk" />
						<ListBoxItem Content="Mountain" />
						<ListBoxItem Content="Muraganda" />
						<ListBoxItem Content="Mutant" />
						<ListBoxItem Content="Myr" />
						<ListBoxItem Content="Mystic" />
						<ListBoxItem Content="Nautilus" />
						<ListBoxItem Content="Nephilim" />
						<ListBoxItem Content="Nightmare" />
						<ListBoxItem Content="Nightstalker" />
						<ListBoxItem Content="Ninja" />
						<ListBoxItem Content="Nissa" />
						<ListBoxItem Content="Noggle" />
						<ListBoxItem Content="Nomad" />
						<ListBoxItem Content="Octopus" />
						<ListBoxItem Content="Ogre" />
						<ListBoxItem Content="Ooze" />
						<ListBoxItem Content="Orc" />
						<ListBoxItem Content="Orgg" />
						<ListBoxItem Content="Ouphe" />
						<ListBoxItem Content="Ox" />
						<ListBoxItem Content="Oyster" />
						<ListBoxItem Content="Pegasus" />
						<ListBoxItem Content="Phelddagrif" />
						<ListBoxItem Content="Phoenix" />
						<ListBoxItem Content="Phyrexia" />
						<ListBoxItem Content="Pirate" />
						<ListBoxItem Content="Plains" />
						<ListBoxItem Content="Plant" />
						<ListBoxItem Content="Power-Plant" />
						<ListBoxItem Content="Rabbit" />
						<ListBoxItem Content="Rabiah" />
						<ListBoxItem Content="Rat" />
						<ListBoxItem Content="Rath" />
						<ListBoxItem Content="Ravnica" />
						<ListBoxItem Content="Realm" />
						<ListBoxItem Content="Rebel" />
						<ListBoxItem Content="Rhino" />
						<ListBoxItem Content="Rigger" />
						<ListBoxItem Content="Rogue" />
						<ListBoxItem Content="Salamander" />
						<ListBoxItem Content="Samurai" />
						<ListBoxItem Content="Sarkhan" />
						<ListBoxItem Content="Satyr" />
						<ListBoxItem Content="Scarecrow" />
						<ListBoxItem Content="Scorpion" />
						<ListBoxItem Content="Scout" />
						<ListBoxItem Content="Segovia" />
						<ListBoxItem Content="Serpent" />
						<ListBoxItem Content="Serra's" />
						<ListBoxItem Content="Shade" />
						<ListBoxItem Content="Shadowmoor" />
						<ListBoxItem Content="Shaman" />
						<ListBoxItem Content="Shandalar" />
						<ListBoxItem Content="Shapeshifter" />
						<ListBoxItem Content="Sheep" />
						<ListBoxItem Content="Shrine" />
						<ListBoxItem Content="Siren" />
						<ListBoxItem Content="Skeleton" />
						<ListBoxItem Content="Slith" />
						<ListBoxItem Content="Sliver" />
						<ListBoxItem Content="Slug" />
						<ListBoxItem Content="Snake" />
						<ListBoxItem Content="Soldier" />
						<ListBoxItem Content="Soltari" />
						<ListBoxItem Content="Sorin" />
						<ListBoxItem Content="Specter" />
						<ListBoxItem Content="Spellshaper" />
						<ListBoxItem Content="Sphinx" />
						<ListBoxItem Content="Spider" />
						<ListBoxItem Content="Spike" />
						<ListBoxItem Content="Spirit" />
						<ListBoxItem Content="Sponge" />
						<ListBoxItem Content="Squid" />
						<ListBoxItem Content="Squirrel" />
						<ListBoxItem Content="Starfish" />
						<ListBoxItem Content="Surrakar" />
						<ListBoxItem Content="Swamp" />
						<ListBoxItem Content="Tezzeret" />
						<ListBoxItem Content="Thalakos" />
						<ListBoxItem Content="Thopter" />
						<ListBoxItem Content="Thrull" />
						<ListBoxItem Content="Tower" />
						<ListBoxItem Content="Trap" />
						<ListBoxItem Content="Treefolk" />
						<ListBoxItem Content="Troll" />
						<ListBoxItem Content="Turtle" />
						<ListBoxItem Content="Ulgrotha" />
						<ListBoxItem Content="Unicorn" />
						<ListBoxItem Content="Urza's" />
						<ListBoxItem Content="Valla" />
						<ListBoxItem Content="Vampire" />
						<ListBoxItem Content="Vedalken" />
						<ListBoxItem Content="Viashino" />
						<ListBoxItem Content="Volver" />
						<ListBoxItem Content="Wall" />
						<ListBoxItem Content="Warrior" />
						<ListBoxItem Content="Weird" />
						<ListBoxItem Content="Whale" />
						<ListBoxItem Content="Wildfire" />
						<ListBoxItem Content="Wizard" />
						<ListBoxItem Content="Wolf" />
						<ListBoxItem Content="Wolverine" />
						<ListBoxItem Content="Wombat" />
						<ListBoxItem Content="Worm" />
						<ListBoxItem Content="Wraith" />
						<ListBoxItem Content="Wurm" />
						<ListBoxItem Content="Yeti" />
						<ListBoxItem Content="Zendikar" />
						<ListBoxItem Content="Zombie" />
						<ListBoxItem Content="Zubera" />
					</ComboBox>
					<ComboBox x:Name="cmbSort" Margin="0,0,5,0" Grid.Row="8" VerticalAlignment="Center" Grid.Column="1" SelectedIndex="0" TabIndex="7">
						<ListBoxItem Content="Rarity"/>
						<ListBoxItem Content="Color"/>
						<ListBoxItem Content="Name"/>
						<ListBoxItem Content="Cost"/>
					</ComboBox>
					<Label HorizontalAlignment="Left" Margin="0" Content="Sort By:" Grid.Row="8"/>
				</Grid>
				<Grid x:Name="GridDecks" Margin="0,5,0,0" Grid.Row="1" d:LayoutOverrides="GridBox" MinHeight="200" Background="{DynamicResource ControlBoxBrush}">
					<Grid.RowDefinitions>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="*"/>
					</Grid.RowDefinitions>
					<Label HorizontalAlignment="Center" Margin="0" Content="Decks" VerticalAlignment="Center"/>
					<UniformGrid Margin="0,0,0,2" Grid.Row="1" Columns="3" Rows="1">
						<Button x:Name="btnOpen" Content="Open" Margin="0,0,2,0" Click="btnOpen_Click"/>
						<Button x:Name="btnNewDeck" Content="New" Margin="0,0,2,0" Click="btnNewDeck_Click"/>
						<Button x:Name="btnDeleteDeck" Content="Delete" Click="btnDeleteDeck_Click" />						
					</UniformGrid>
					<ListBox x:Name="lbDecks" Margin="0" Grid.Row="2" SelectionChanged="lbDecks_SelectionChanged"/>
				</Grid>
				<local:DeckStatistics x:Name="deckStatistics" Margin="0,5,0,0" d:LayoutOverrides="Width" Grid.Row="2" Background="{DynamicResource ControlBoxBrush}" Visibility="Collapsed"/>
			</Grid>
        
		</Grid>
	</Grid>
</Window>
